CloudWatch Metrics
💡 Definition
CloudWatch Metrics are data points about your AWS resources published to CloudWatch. A metric represents a time-ordered set of data points that are either published by AWS services or by your own applications.
🔑 Key Concepts
- Time-Series Data: Data points monitored over time (e.g., CPU Utilization every minute).
- Namespaces: Containers for metrics (e.g.,
AWS/EC2for EC2 metrics). - Dimensions: Name/value pairs that identify the metric (e.g.,
InstanceId=i-12345). - Custom Metrics: You can publish your own application metrics (e.g., "PageViews", "OrdersProcessed").
⚙️ How it Works
AWS services automatically send metrics to CloudWatch (e.g., EC2 sends CPU, Disk I/O, Network). You can view these in the console or retrieve them via API. You can create graphs and dashboards from them.
🎯 Use Cases
- Performance Monitoring: Tracking if your server is overloaded.
- Operational Health: Monitoring error rates of your API Gateway.
- Billing: Billing data is stored as metrics in the
AWS/Billingnamespace.
💰 Pricing Model
- Standard Metrics: (Provided by AWS services) are often free or low cost.
- Custom Metrics: Charged per metric per month.
- API Requests: Charged for
GetMetricDatacalls.
📝 Exam Tips (CLF-C02)
- Metrics are the fundamental data unit of CloudWatch.
- Used to trigger CloudWatch Alarms.
- EC2 Memory usage is not a default metric (requires a custom agent).
See Also: * CloudWatch * CloudWatch Alarms